home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / window.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  48 lines

  1. /*  WINDOW.H   Window is the area on screen.
  2.     It can remember its underground or its contents. You must first show
  3.     window, and only then output somthing into it */
  4.  
  5. #ifndef __WINDOW_H_
  6. #define __WINDOW_H_
  7.  
  8. #include <stdio.h>
  9.  
  10. #include <alloc.h>
  11.  
  12. #include "border.h"
  13. #include "visible.h"
  14. #include "dim.h"
  15.  
  16. class Window : public Border, public Visible
  17.     {
  18.     protected:
  19.         char* fileName;
  20.     int resize_status;      // FIXED, MOVE, RESIZE, MOVE_RESIZE
  21.         int pattern;
  22.     public:
  23.     Window(rect coordinates, char* fName = "", char* h = "",
  24.            int s = 0, BORDERS b_type = SHOW_BORDER,
  25.            BORDERS hdr_b_type = SHOW_BORDER,
  26.            int res = 0, int pat = 0, int hdr_pat = 0);
  27.  
  28.         virtual ~Window() { unlink(fileName); delete fileName; }
  29.         rect get_rectangle() { return rectangle; }
  30.     virtual void repose(rect new_pos);
  31.  
  32.     virtual void show();
  33.         void show_window();
  34.         virtual void hide();
  35.  
  36.         int get_status(int status) { return resize_status & status; }
  37.     void clrscr();
  38.     int get_shadow() { return shadow; }
  39.  
  40.     rect user_screen();      // work area of the window, screen coords
  41.     virtual void exe(int act = 0);
  42.  
  43.     virtual rect bound() { return screenRect(rectangle); }
  44.     void hilite();
  45.     void unhilite();
  46.     };
  47.  
  48. #endif __WINDOW_H_